| Visual Basic (Declaration) | |
|---|---|
<ExtensionAttribute()> Public Overloads Shared Function ToQuery(Of T As {Class, IEntity})( _ ByVal entity As T _ ) As EntityQuery(Of T) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim entity As T Dim value As EntityQuery(Of T) value = EntityQueryExtensions.ToQuery(Of T)(entity) | |
| C# | |
|---|---|
[ExtensionAttribute()] public static EntityQuery<T> ToQuery<T>( T entity ) where T: class, IEntity | |
| C++/CLI | |
|---|---|
[ExtensionAttribute()] public: static EntityQuery<T^>^ ToQuerygeneric<typename T> ( T^ entity ) where T: ref class, IEntity | |
Parameters
- entity
Type Parameters
- T
| C# | Copy Code |
|---|---|
var mgr = new DomainModelEntityManager(); var customers = mgr.Customers.ToList(); var aCust = customers.First(); // Build a query to retrieve this customer var query = aCust.ToQuery(); | |
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family